`<div class="swiper-container swiper-container1 nav_erji">
    <ul class="swiper-wrapper">
    	{foreach name="arr" item="v"}
	        <li class="swiper-slide">
	        	<a 
	        		{if condition="($cid==$v['cid'])"}
	        		    class="on_erji" 
	        		{else /}
	        		   class="" 
	        		{/if}
	        		href="http://127.0.0.1/tp_5.0.5/public/index.php/index/{$v['link']}?cid={$v['cid']}" title="{$v['cname']}">{$v['cname']}</a>
	        </li>
        {/foreach}
       
    </ul>
</div>
<script>
	$(function(){
		var num = $('.nav_erji li').length;
		if($(window).width()<=750){
			num = 2;
		}
		$('.nav_erji').width(num*$('.nav_erji li').width());
		var swiper1 = new Swiper('.swiper-container1', {
			slidesPerView : num,
		});
		
	})
</script>